Update value in nested dictionary